home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 May: Tool Chest / Developer CD Series Tool Chest (Apple Computer)(May 1999).iso / Tool Chest / Development Kits / MPW etc / MPW-GM / MPW / MPButtons / More Buttons / DeepFind < prev    next >
Encoding:
Text File  |  1996-10-30  |  835 b   |  35 lines  |  [TEXT/MPS ]

  1. #
  2. # DeepFind - a script MPButton
  3. # Searches for the current selection in text files recursively, starting in the working directory
  4. #
  5. #
  6. # © 1996 Soften
  7. #
  8.  
  9. # Case sensitive search can be invoked using:
  10. #
  11. #    - a click with no modifs, or
  12. #    - Control-Command-H shortcut
  13.  
  14. #MPB AREA 0
  15. #MPB SHORTCUT Control-Command-H
  16. Set currSel "``Catenate "{{Active}}".§``"
  17. If "{{currSel}}" != ""
  18.     Search "{{currSel}}" `Files -o -f -r -t TEXT ":"` -s >> "{Worksheet}"   && Open "{Worksheet}"
  19. End
  20. Unset currSel
  21.  
  22.  
  23. # Case insensitive search can be invoked using:
  24. #
  25. #    - Option-click, or
  26. #    - Control-Option-Command-H shortcut
  27.  
  28. #MPB MODIFS Option
  29. #MPB SHORTCUT Control-Option-Command-H
  30. Set currSel "``Catenate "{{Active}}".§``"
  31. If "{{currSel}}" != ""
  32.     Search "{{currSel}}" `Files -o -f -r -t TEXT ":"` -i >> "{Worksheet}"   && Open "{Worksheet}"
  33. End
  34. Unset currSel
  35.